{% set product = hookable_metadata.context.resource %}

<div class="card mb-3">
    <div class="card-header">
        <div class="card-title">
            {{ 'sylius.ui.associations'|trans }}
        </div>
    </div>
    <div class="card-body" {{ sylius_test_html_attribute('associations') }}>
        {% if product.associations is empty %}
            {{ 'sylius.ui.no_associations_to_display'|trans }}
        {% else %}
            {% for association in product.associations %}
                <strong>{{ association.type.name }}:</strong>
                <ul>
                    {% for associated_product in association.associatedProducts %}
                        <li>{{ associated_product.name }}</li>
                    {% endfor %}
                </ul>
            {% endfor %}
        {% endif %}
    </div>
</div>
